package frame.options.simulation.create.links;

import java.awt.Component;

import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;

import model.algorithms.linksMapping.LinksMappingAlgorithm;

@SuppressWarnings("serial")
public class LinksListCellRenderer extends DefaultListCellRenderer
{
	@Override
	public Component getListCellRendererComponent( JList< ? > list, Object value, int index, boolean isSelected, boolean cellHasFocus )
	{
		super.getListCellRendererComponent( list, value, index, isSelected, cellHasFocus );
		
		this.setText( ( (LinksMappingAlgorithm) value ).getName() );
		
		return this;
	}

}
